// 健康检查接口(监控接口是否正常，服务是否在线)
exports.getHealthStatus = (req, res) => {
    const responseTime = Math.floor(Math.random() * 100); // 模拟响应速度
    const memoryUsage = process.memoryUsage();
  
    res.json({
      status: 'ok',
      timestamp: new Date(),
      uptime: process.uptime(), // 秒
      memory: {
        rss: memoryUsage.rss, // 常驻内存
        heapUsed: memoryUsage.heapUsed,
        heapTotal: memoryUsage.heapTotal
      },
      responseTime: responseTime // ms
    });
  };
  